#pragma once

namespace CPU {
//perform inversion of LU fractorization in-place
void inplace_trtri(double* A, lapack_int * ipiv, int n, int lda);

void update_lutrtri(double* A, double* inverse, lapack_int * ipiv, double* workplace, int m, int n, int lda, int ldi);

void solve_trmv(double* inverse, double* rhs, int n, int lda);
};

namespace DEVICE {
void update_lutrtri(SOLVER_HANDLE handle, double* A, double* inverse, int m, int n, int lda, int ldi);

void solve_trmv(SOLVER_HANDLE handle, double* inverse, double* rhs, int n, int lda);
};